      *> File Name     000023_AssemblyAttributes.cbl.
      *> Description   Setting and getting assembly attributes.
      *> Project Type  Console application.
      *> CodePlex URL  http://cobol.codeplex.com/
      
      *> Comments      Assemby attributes are set using the Assembly-
      *>               Attributes paragraph. For an example showing the
      *>               Class-Attributes paragraph, see 000003_Enums.cbl.
       
       program-id.   Main.
       repository.
           class assembly  as "System.Reflection.Assembly"
           class title-att as "System.Reflection.AssemblyTitleAttribute"
           .
       assembly-attributes.
           custom-attribute title-att("My Assembly").
       working-storage section.
       01  asm         assembly.
       01  att         object.
       01  attributes  object occurs any.
       procedure division.
           move "Setting and Getting Assembly Attributes"
               to type "System.Console"::"Title"
           
           move assembly::"GetExecutingAssembly" to asm
           move asm::"GetCustomAttributes"(true) to attributes
           
           perform varying att through attributes
               if att::"GetType" = type of title-att then
                   display "Assembly Title: " att as title-att::"Title"
               end-if
           end-perform
           
           display "Press any key to continue . . . " no advancing
           invoke type "System.Console"::"ReadKey"(true)
           .
       end program   Main.